<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .container {
            width: 400px;
            height: 100px;
            overflow: hidden;
            /* 隐藏div的溢出内容 */
            border: 1px solid #ccc;
        }

        .scrolling-text {
            white-space: nowrap;
            /* 文字不换行 */
            animation: scroll-left 10s linear infinite;
            /* 使用动画使文字水平滚动 */
        }

        @keyframes scroll-left {
            0% {
                transform: translateX(100%);
                /* 初始位置在最右边 */
            }

            100% {
                transform: translateX(-100%);
                /* 最终位置在最左边 */
            }
        }
    </style>
</head>

<body>
    <div class="container">
        <div class="scrolling-text">This is a long scrolling text that will continuously scroll horizontally.</div>
    </div>

</body>

</html>